<?php if ($this->posts_list) {?>
<?php foreach($this->posts_list as $key => $val) {?>
<div class="aw-item" id="aw-item_<?php echo $key;?>">
	<div class="aw-user-imgs">
	<?php if ($val['anonymous'] == 0) { ?><a class="aw-user-name aw-user-name-o hidden-xs" data-id="<?php echo $val['user_info']['uid']; ?>" href="people/<?php echo $val['user_info']['url_token']; ?>" rel="nofollow"><img src="<?php echo get_avatar_url($val['user_info']['uid'], 'max'); ?>" alt="" /><p><?php echo $val['user_info']['user_name'];?></p><?php if ($val['user_info']['verified']) { ?><?php if ($val['user_info']['verified'] == 'personal') { ?><i class="icon icon-v"></i><?php } else { ?><i class="icon icon-v i-ve"></i><?php } ?><?php } ?></a><?php } else { ?><a class="aw-user-name aw-user-name-o hidden-xs" href="javascript:;"><img src="<?php echo G_STATIC_URL; ?>/common/avatar-max-img.png" alt="<?php _e('匿名用户'); ?>" title="<?php _e('匿名用户'); ?>" /><p><?php _e('匿名用户'); ?></p></a><?php } ?>
	<div class="userline hidden-xs" id="userline_<?php echo $key;?>"></div>
	</div>
	<div class="aw-question-content" id="aw-question-content_<?php echo $key;?>">
		<h4>
			<?php if ($val['is_recommend']==1) { ?><span class="spanb_c">荐</span><?php }?>
			<?php if ($val['view_count']>=FOX_Huo_num) { ?><span class="spanb_b">热</span><?php }?>
			<?php if ($val['answer_count']>=FOX_Gan_num) { ?><span class="spanb_d">议</span><?php }?>
			<?php if ($val['best_answer']>0) { ?><span class="spanb_e">结</span><?php }?>
			<a href="question/<?php echo $val['question_id']; ?>"><?php echo $val['question_content']; ?></a>
		</h4>	
		<div class="inner clearfix">
		<?php $str = FORMAT::ubbfirebox($val['question_detail']);
		$str = FORMAT::parse_attachs(nl2br(FORMAT::parse_bbcode(cjk_substr(strip_tags($str), 0, 80, 'UTF-8', '...'))));
		if(strlen(strip_tags($str))>10){?>
		<div class="inner clearfix question-text" style="color: #666; font-size:13px;">
			<?php if ($val['attachs']) {
			$attach=array_rand($val['attachs'],1);?>
				<a href="<?php echo $val['attachs'][$attach]['attachment']; ?>" target="_blank" data-fancybox-group="thumb" rel="lightbox" class="pull-right hidden-xs">
					<img style="margin:0 0 10px 10px;width:100px;" class="img-polaroidst" src="<?php echo $val['attachs'][$attach][thumb]; ?>" alt="<?php echo $val['attachs'][$attach]['file_name']; ?>" />
				</a>
			<?php }else{
			$body=$val['question_detail'];
			$img_array = array();
			preg_match_all("/\[img\](.*?)\[\/img\]/i",$body,$img_array);
			$img_array = array_unique($img_array[1]);
			if(count($img_array)>0){
			foreach($img_array AS $key => $attach) {
			if($key==0){?>
			<a href="<?php echo $attach; ?>" target="_blank" data-fancybox-group="thumb" rel="lightbox" class="pull-right hidden-xs">
				<img style="margin:0 0 10px 10px;width:100px;" class="img-polaroidst shiboximgs" src="<?php echo $attach; ?>" alt="<?php echo $attach; ?>" />
			</a>
			<?php }}}} ?>
			<?php echo $str; ?>
		</div>
		<?php } ?>
		<div class="inner clearfix">
			<?php if ($_GET['category'] != $val['category_id'] AND $val['category_info']['title']) { ?>
				<a class="aw-question-tags" href="explore/category-<?php echo $val['category_info']['url_token']; ?>"><?php echo $val['category_info']['title']; ?></a>
				• <?php } ?>
			<?php if ($val['question_id']) { ?>
			<?php if ($val['answer_count'] > 0) { ?>
			<?php if ($val['answer_info']['anonymous']) { ?>
				<a href="javascript:;" class="aw-user-name"><?php _e('匿名用户'); ?></a><?php } else { ?><a href="people/<?php echo $val['answer_info']['user_info']['url_token']; ?>" class="aw-user-name" data-id="<?php echo $val['answer_info']['user_info']['uid']; ?>"><?php echo $val['answer_info']['user_info']['user_name']; ?></a><?php } ?> 
				<span class="text-color-999"><?php _e('回复了问题'); ?> • <?php _e('%s 人关注', $val['focus_count']); ?> • <?php _e('%s 个回复', $val['answer_count']); ?> • <?php _e('%s 次浏览', $val['view_count']); ?> • <?php echo date_friendly($val['update_time']); ?>
				</span>
			<?php } else { ?>
			<?php if ($val['anonymous'] == 0) { ?>
				<a href="people/<?php echo $val['user_info']['url_token']; ?>" class="aw-user-name"><?php echo $val['user_info']['user_name']; ?></a><?php } else { ?><a href="javascript:;" class="aw-user-name" data-id="<?php echo $val['uid']; ?>"><?php _e('匿名用户'); ?></a><?php } ?> 
				<span class="text-color-999"><?php _e('发起了问题'); ?> • <?php _e('%s 人关注', $val['focus_count']); ?> • <?php _e('%s 个回复', $val['answer_count']); ?> • <?php _e('%s 次浏览', $val['view_count']); ?> • <?php echo date_friendly($val['add_time']); ?> 
				</span>
			<?php } ?>
			<?php }?>
			<?php if($val['attachs']){
			if (is_array($val['answer_users'])) { ?>
				<span class="pull-right hidden-xs contribute text-color-999"><?php _e('贡献'); ?> 
				<?php foreach ($val['answer_users'] AS $answer_user) { ?>
				<a class="aw-user-name" data-id="<?php echo $answer_user['uid']; ?>" href="people/<?php echo $answer_user['url_token']; ?>" rel="nofollow"><img src="<?php echo get_avatar_url($answer_user['uid'], 'mid'); ?>" alt="" /></a>
				<?php } ?>
			<?php } else if ($val['question_id']) { ?>
				<span class="pull-right hidden-xs contribute text-color-999">
				<a href="question/<?php echo $val['question_id']; ?>#!answer_form" class="pull-right aw-icon-thank-tips text-color-999" data-original-title="回复" data-toggle="tooltip" title="" data-placement="bottom"><?php _e('回复'); ?> <i class="icon icon-comment"></i></a>
				</span>
			<?php }} ?>
			<?php if(!$val['attachs']){
			if (is_array($val['answer_users'])) { ?>
			<div class="pull-right hidden-xs contribute text-color-999"><?php _e('贡献'); ?> 
				<?php foreach ($val['answer_users'] AS $answer_user) { ?>
				<a class="aw-user-name" data-id="<?php echo $answer_user['uid']; ?>" href="people/<?php echo $answer_user['url_token']; ?>" rel="nofollow"><img src="<?php echo get_avatar_url($answer_user['uid'], 'mid'); ?>" alt="" /></a>
				<?php } ?>
			</div>
			<?php } else if ($val['question_id']) { ?>
			<div class="pull-right">
			<a href="question/<?php echo $val['question_id']; ?>#!answer_form" class="pull-right aw-icon-thank-tips text-color-999" data-original-title="回复" data-toggle="tooltip" title="" data-placement="bottom"><?php _e('回复'); ?> <i class="icon icon-comment"></i></a>
			</div>
			<?php }} ?>
		</div>
		</div>
	</div>
</div>

<?php } ?>
<?php } ?>